LOCAL_PATH:= $(call my-dir)
 
CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline \
 -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long \
 -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral \
 -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement \
 -Wno-system-headers -DHAVE_CONFIG_H

#  common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs \
# -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar \
# -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes \
# -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
 
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../lib/Makefile.inc
 
LOCAL_SRC_FILES := $(addprefix ../lib/,$(CSOURCES))
LOCAL_CFLAGS += $(CFLAGS) -DBUILDING_LIBCURL
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include/ $(LOCAL_PATH)/../lib
 
LOCAL_COPY_HEADERS_TO := libcurl
LOCAL_COPY_HEADERS := $(addprefix ../include/curl/,$(HHEADERS))
 
LOCAL_MODULE:= curl
 
include $(BUILD_STATIC_LIBRARY)


include $(CLEAR_VARS)
#include $(LOCAL_PATH)/../src/Makefile.inc

LOCAL_STATIC_LIBRARIES += curl
#LOCAL_SRC_FILES := $(addprefix ../src/,$(CURL_CFILES))
# LOCAL_LDFLAGS := $(LOCAL_PATH)/../obj/local/$(TARGET_ARCH_ABI)/libcurl.a
# LOCAL_SYSTEM_SHARED_LIBRARIES := libc
LOCAL_SRC_FILES := main.c

LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include/ $(LOCAL_PATH)/../lib $(LOCAL_PATH)/../include/curl/
LOCAL_LDFLAGS += -pie -fPIE
LOCAL_MODULE= curlbin
LOCAL_CFLAGS += $(CFLAGS)  -pie -fPIE

include $(BUILD_EXECUTABLE)


